#!/bin/bash
echo 'Building a JAR File of Interface Classes'
cd ./src
javac compute/Compute.java compute/Task.java
jar cvf ../bin/compute.jar compute/*.class
echo 'Building the Server Classes'
javac -cp ../bin/compute.jar \
	engine/ComputeEngine.java
jar cvf ../bin/server.jar engine/*.class
echo 'Building the Client Classes'
javac -cp ../bin/compute.jar \
    client/ComputePi.java client/Pi.java
jar cvf ../bin/client.jar client/*.class
echo 'deploy to web_server'
cp ./client/*.class ../deploy/classes/client/
#cp ./client/*.class /var/www/rmi_calc_pi/classes/client/
echo 'done.'
